package com.neuedu.his.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.neuedu.his.po.Herbalprescription;
import com.neuedu.his.po.Medicalrecord;
import com.neuedu.his.service.HerbalprescriptionService;
import com.neuedu.his.service.MedicalrecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/herbalprescription")
public class HerbalPrescriptionController {


    @Autowired
    private HerbalprescriptionService service;


    @RequestMapping("/getByregisterid")  // 修改路径名
    public List<Herbalprescription> getByregisterid(@RequestParam Integer registerid) {  // 方法名也修改
        System.out.println("getByregisterid   registerid="+registerid);
        QueryWrapper<Herbalprescription> qw = new QueryWrapper<>();
        qw.eq("registerid", registerid);
        return service.list(qw);
    }

}
